package com.service;

import com.entity.User;
import com.github.pagehelper.PageInfo;

import com.entity.Resource;
import com.util.AjaxResult;
import com.vo.ResourceVo;
import com.vo.UserResource;
import org.apache.ibatis.annotations.Param;
import sun.text.resources.FormatData;

public interface ResourceService {
//    用户删除资源 pj
    public AjaxResult removeFrontResource(int id);
//    潘军
//    PageInfo findBackResource(int id);
    //    潘军 添加资源
    public int addFrontResource(FormatData formatData, User user);
//    后台查询资源 pj
    public PageInfo<Resource> findBackResource(int pageno, ResourceVo resourceVo);
//    修改启用禁用 潘军
    public AjaxResult toggleStatus(Resource resource);
    //@Lqz 资源校验
    //验证用户积分或金币是否足够
    public Resource selectResourceByResourceId(Integer resource_id);

    public Resource findResourceByid(Integer resourceId);

    public UserResource selectUserResourceByUidAndResId(Integer uid,Integer resid);

    public int insertUserResource(UserResource resource);


}
